<?php

namespace Alipay\AlipayFund\Request;

use Alipay\AlipayFund\Info\Parties;
use Alipay\AlipayFund\Info\PayeeList;
use Alipay\AlipayFund\Response\AlipayFundAccountQueryResponse;
use Alipay\AlipayFund\Response\AlipayFundBatchCloseResponse;
use Alipay\AlipayFund\Response\AlipayFundTransCommonQueryResponse;
use Alipay\AlipayFund\Response\AlipayFundTransPagePayResponse;
use Alipay\Common\Request;
use Alipay\Common\RequestBase;

class AlipayFundTransCommonQueryRequest extends RequestBase
{
    protected $method = 'alipay.fund.trans.common.query';

    protected $response = AlipayFundTransCommonQueryResponse::class;

    /**
     * @var string $outBizNo
     */
    protected $outBizNo;

    /**
     * @var string $orderId
     */
    protected $orderId;

    /**
     * @var string $payFundOrderId
     */
    protected $payFundOrderId;

    /**
     * 生成请求参数
     * @return array
     * @author xis
     */
    public function generate(): array
    {
        $data = [
            'product_code' => '',
            'biz_scene' => '',
            'out_biz_no' => $this->outBizNo,
            'order_id' => $this->orderId,
            'pay_fund_order_id' => $this->payFundOrderId
        ];


        if ($this->outBizNo) {
            $data['product_code'] = 'TRANS_ACCOUNT_NO_PWD';
            $data['biz_scene'] = 'DIRECT_TRANSFER';
        }

        return $data;
    }

    /**
     * @return string
     */
    public function getOutBizNo(): string
    {
        return $this->outBizNo;
    }

    /**
     * @param string $outBizNo
     * @return AlipayFundTransCommonQueryRequest
     */
    public function setOutBizNo(string $outBizNo): AlipayFundTransCommonQueryRequest
    {
        $this->outBizNo = $outBizNo;
        return $this;
    }

    /**
     * @return string
     */
    public function getOrderId(): string
    {
        return $this->orderId;
    }

    /**
     * @param string $orderId
     * @return AlipayFundTransCommonQueryRequest
     */
    public function setOrderId(string $orderId): AlipayFundTransCommonQueryRequest
    {
        $this->orderId = $orderId;
        return $this;
    }

    /**
     * @return string
     */
    public function getPayFundOrderId(): string
    {
        return $this->payFundOrderId;
    }

    /**
     * @param string $payFundOrderId
     * @return AlipayFundTransCommonQueryRequest
     */
    public function setPayFundOrderId(string $payFundOrderId): AlipayFundTransCommonQueryRequest
    {
        $this->payFundOrderId = $payFundOrderId;
        return $this;
    }



}